home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / net / omniORB-2.5.0-src.tar.gz / omniORB-2.5.0-src.tar / omniORB_2.5.0 / include / omniORB2 / seqtemplates.h < prev    next >
C/C++ Source or Header  |  1998-03-05  |  26KB  |  732 lines

  1. // -*- Mode: C++; -*-
  2. //                            Package   : omniORB2
  3. // seqtemplates.h             Created on: 14/5/96
  4. //                            Author    : Sai Lai Lo (sll)
  5. //
  6. //    Copyright (C) 1996, 1997 Olivetti & Oracle Research Laboratory
  7. //
  8. //    This file is part of the omniORB library
  9. //
  10. //    The omniORB library is free software; you can redistribute it and/or
  11. //    modify it under the terms of the GNU Library General Public
  12. //    License as published by the Free Software Foundation; either
  13. //    version 2 of the License, or (at your option) any later version.
  14. //
  15. //    This library is distributed in the hope that it will be useful,
  16. //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  18. //    Library General Public License for more details.
  19. //
  20. //    You should have received a copy of the GNU Library General Public
  21. //    License along with this library; if not, write to the Free
  22. //    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
  23. //    02111-1307, USA
  24. //
  25. //
  26. // Description:
  27. //    *** PROPRIETORY INTERFACE ***
  28.  
  29. /*
  30.  $Log: seqtemplates.h,v $
  31.  Revision 1.12  1998/03/05 11:21:16  sll
  32.  Added NP_data() to all the derived class of Sequence_Array. This is
  33.  to remove the warning given by some compiler, such as HPUX C++.
  34.  
  35.  Revision 1.11  1998/01/28 14:29:48  ewc
  36.  *** empty log message ***
  37.  
  38.  * Revision 1.10  1998/01/27  19:35:56  ewc
  39.  * Revised Octet and Boolean templates
  40.  *
  41.  * Revision 1.9  1998/01/27  16:08:45  ewc
  42.  * Added new classes and templates for sequence of Boolean and sequence
  43.  * of Octet.
  44.  *
  45.  Revision 1.8  1997/12/18 17:35:52  sll
  46.  _CORBA_Sequence copy ctor should allocate s.pd_max elements instead of
  47.  s.pd_len elements.
  48.  
  49.  Revision 1.7  1997/12/09 20:42:25  sll
  50.  Updated sequence array templates.
  51.  
  52.  Revision 1.6  1997/08/21 22:21:56  sll
  53.  New templates to support sequence of array.
  54.  
  55.  * Revision 1.5  1997/05/06  16:11:10  sll
  56.  * Public release.
  57.  *
  58.  */
  59.  
  60. #ifndef __SEQTEMPLATES_H__
  61. #define __SEQTEMPLATES_H__
  62.  
  63. class NetBufferedStream;
  64. class MemBufferedStream;
  65.  
  66. template <class T>
  67. class _CORBA_Sequence {
  68. public:
  69.   inline _CORBA_Sequence() : pd_max(0), pd_len(0), pd_rel(1), pd_buf(0) { }
  70.   inline _CORBA_Sequence(_CORBA_ULong max) :
  71.              pd_max(max), pd_len(0), pd_rel(1)
  72.   {
  73.     if (!(pd_buf = allocbuf(max))) {
  74.       _CORBA_new_operator_return_null();
  75.       // never reach here
  76.     }
  77.     return;
  78.   }
  79.  
  80.   inline _CORBA_Sequence(_CORBA_ULong max,
  81.              _CORBA_ULong length,
  82.              T           *value,
  83.              _CORBA_Boolean release = 0) 
  84.       : pd_max(max), 
  85.     pd_len(length), 
  86.     pd_rel(release),
  87.     pd_buf(value)
  88.   {
  89.     if (length > max) {
  90.       _CORBA_bound_check_error();
  91.       // never reach here
  92.     }
  93.     return;
  94.   }
  95.  
  96.   inline _CORBA_Sequence(const _CORBA_Sequence<T>& s)
  97.               : pd_max(s.pd_max), 
  98.         pd_len(s.pd_len),
  99.         pd_rel(1)
  100.   {
  101.     if (!(pd_buf = allocbuf(s.pd_max))) {
  102.       _CORBA_new_operator_return_null();
  103.       // never reach here
  104.     }
  105.     for (_CORBA_ULong i=0; i < s.pd_len; i++) {
  106.       pd_buf[i] = s.pd_buf[i];
  107.     }
  108.   }
  109.  
  110.   inline ~_CORBA_Sequence() {
  111.     if (pd_rel && pd_buf) freebuf(pd_buf);
  112.     pd_buf = 0;
  113.     return;
  114.   }
  115.   inline _CORBA_Sequence<T> &operator= (const _CORBA_Sequence<T> &s)
  116.   {
  117.     if (pd_max < s.pd_max)
  118.       {
  119.     T *newbuf = allocbuf(s.pd_max);
  120.     if (!newbuf) {
  121.       _CORBA_new_operator_return_null();
  122.       // never reach here
  123.     }
  124.     pd_max = s.pd_max;
  125.     if (pd_rel && pd_buf) {
  126.       freebuf(pd_buf);
  127.     }
  128.     else {
  129.       pd_rel = 1;
  130.     }
  131.     pd_buf = newbuf;
  132.       }
  133.     pd_len = s.pd_len;
  134.     for (unsigned long i=0; i < pd_len; i++) {
  135.       pd_buf[i] = s.pd_buf[i];
  136.     }
  137.     return *this;
  138.   }
  139.  
  140.   inline _CORBA_ULong maximum() const { return pd_max; }
  141.   inline _CORBA_ULong length() const { return pd_len; }
  142.   inline void length(_CORBA_ULong length)
  143.   {
  144.     if (length > pd_max)
  145.       {
  146.     T *newbuf = allocbuf(length);
  147.     if (!newbuf) {
  148.       _CORBA_new_operator_return_null();
  149.       // never reach here
  150.     }
  151.     for (unsigned long i=0; i < pd_len; i++) {
  152.       newbuf[i] = pd_buf[i];
  153.     }
  154.     pd_max = length;
  155.     if (pd_rel && pd_buf) {
  156.       freebuf(pd_buf);
  157.     }
  158.     else {
  159.       pd_rel = 1;
  160.     }
  161.     pd_buf = newbuf;
  162.       }
  163.     pd_len = length;
  164.     return;
  165.   }
  166.   inline T &operator[] (_CORBA_ULong index)
  167.   {
  168.     if (index >= length()) {
  169.       _CORBA_bound_check_error();
  170.     }
  171.     return pd_buf[index];
  172.   }
  173.   inline const T &operator[] (_CORBA_ULong index) const
  174.   {
  175.     if (index >= length()) {
  176.       _CORBA_bound_check_error();
  177.     }
  178.     return pd_buf[index];
  179.   }
  180.   static inline T* allocbuf(_CORBA_ULong nelems)
  181.   {
  182.     return new T[nelems];
  183.   }
  184.   static inline void freebuf(T * b)
  185.   {
  186.     if (b) delete [] b; 
  187.     return;
  188.   }
  189.   // omniORB2 extensions
  190.   inline T *NP_data() const { return pd_buf; }
  191.   inline void NP_norelease() { pd_rel = 0; }
  192.   inline void operator>>= (NetBufferedStream &s) const;
  193.   inline void operator<<= (NetBufferedStream &s);
  194.   inline void operator>>= (MemBufferedStream &s) const;
  195.   inline void operator<<= (MemBufferedStream &s);
  196. private:
  197.   _CORBA_ULong    pd_max;
  198.   _CORBA_ULong    pd_len;
  199.   _CORBA_Boolean  pd_rel;
  200.   T              *pd_buf;
  201. };
  202.  
  203. template <class T>
  204. class _CORBA_Unbounded_Sequence : public _CORBA_Sequence<T> {
  205. public:
  206.   inline _CORBA_Unbounded_Sequence() {}
  207.   inline _CORBA_Unbounded_Sequence(_CORBA_ULong max) : _CORBA_Sequence<T>(max) {}
  208.   inline _CORBA_Unbounded_Sequence(_CORBA_ULong max,
  209.                    _CORBA_ULong length,
  210.                    T           *value,
  211.                    _CORBA_Boolean release = 0)
  212.      : _CORBA_Sequence<T>(max,length,value,release) {}
  213.   inline _CORBA_Unbounded_Sequence(const _CORBA_Unbounded_Sequence<T>& s) 
  214.      : _CORBA_Sequence<T>(s) {}
  215.   inline ~_CORBA_Unbounded_Sequence() {}
  216.   inline _CORBA_Unbounded_Sequence<T> &operator= (const _CORBA_Unbounded_Sequence<T> &s) {
  217.     _CORBA_Sequence<T>::operator= (s);
  218.     return *this;
  219.   }
  220.   inline size_t NP_alignedSize(size_t initialoffset) const;
  221.   inline void operator>>= (NetBufferedStream &s) const;
  222.   inline void operator<<= (NetBufferedStream &s);
  223.   inline void operator>>= (MemBufferedStream &s) const;
  224.   inline void operator<<= (MemBufferedStream &s);
  225. };
  226.  
  227. template <class T,int elmSize,int elmAlignment>
  228. class _CORBA_Unbounded_Sequence_w_FixSizeElement 
  229.    : public _CORBA_Sequence<T> 
  230. {
  231. public:
  232.   inline _CORBA_Unbounded_Sequence_w_FixSizeElement() {}
  233.   inline _CORBA_Unbounded_Sequence_w_FixSizeElement(_CORBA_ULong max)
  234.     : _CORBA_Sequence<T>(max) {}
  235.   inline _CORBA_Unbounded_Sequence_w_FixSizeElement(_CORBA_ULong max,
  236.                             _CORBA_ULong length,
  237.                             T           *value,
  238.                             _CORBA_Boolean release = 0)
  239.     : _CORBA_Sequence<T>(max,length,value,release) {}
  240.   inline _CORBA_Unbounded_Sequence_w_FixSizeElement (const 
  241.        _CORBA_Unbounded_Sequence_w_FixSizeElement<T,elmSize,elmAlignment>& s)
  242.     : _CORBA_Sequence<T>(s) {}
  243.   inline ~_CORBA_Unbounded_Sequence_w_FixSizeElement() {}
  244.   inline _CORBA_Unbounded_Sequence_w_FixSizeElement<T,elmSize,elmAlignment> &
  245.       operator= 
  246.         (const 
  247.       _CORBA_Unbounded_Sequence_w_FixSizeElement<T,elmSize,elmAlignment> &
  248.      s) 
  249.   {
  250.     _CORBA_Sequence<T>::operator= (s);
  251.     return *this;
  252.   }
  253.   inline size_t NP_alignedSize(size_t initialoffset) const;
  254.   inline void operator>>= (NetBufferedStream &s) const;
  255.   inline void operator<<= (NetBufferedStream &s);
  256.   inline void operator>>= (MemBufferedStream &s) const;
  257.   inline void operator<<= (MemBufferedStream &s);
  258. };
  259.  
  260. class _CORBA_Unbounded_Sequence__Boolean
  261.    : public _CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Boolean,1,1>
  262. {
  263. public:
  264.   inline _CORBA_Unbounded_Sequence__Boolean() {}
  265.   inline _CORBA_Unbounded_Sequence__Boolean(_CORBA_ULong max)
  266.     : _CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Boolean,1,1>(max) {}
  267.   inline _CORBA_Unbounded_Sequence__Boolean(_CORBA_ULong max,
  268.                             _CORBA_ULong length,
  269.                             _CORBA_Boolean   *value,
  270.                             _CORBA_Boolean release = 0)
  271.     : _CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Boolean,1,1>(max,length,value,release) {}
  272.   inline _CORBA_Unbounded_Sequence__Boolean (const 
  273.        _CORBA_Unbounded_Sequence__Boolean& s)
  274.     :  _CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Boolean,1,1>(s) {}
  275.  
  276.   inline ~_CORBA_Unbounded_Sequence__Boolean() {}
  277. };
  278.  
  279. class _CORBA_Unbounded_Sequence__Octet
  280.    : public _CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Octet,1,1>
  281. {
  282. public:
  283.   inline _CORBA_Unbounded_Sequence__Octet() {}
  284.   inline _CORBA_Unbounded_Sequence__Octet(_CORBA_ULong max)
  285.     :  _CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Octet,1,1 >(max) {}
  286.   inline _CORBA_Unbounded_Sequence__Octet(_CORBA_ULong max,
  287.                             _CORBA_ULong length,
  288.                             _CORBA_Octet   *value,
  289.                             _CORBA_Boolean release = 0)
  290.     : _CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Octet,1,1 >(max,length,value,release) {}
  291.   inline _CORBA_Unbounded_Sequence__Octet (const 
  292.        _CORBA_Unbounded_Sequence__Octet& s)
  293.     : _CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Octet,1,1 >(s) {}
  294.  
  295.   inline ~_CORBA_Unbounded_Sequence__Octet() {}
  296. };
  297.  
  298.  
  299. template <class T,int max>
  300. class _CORBA_Bounded_Sequence : public _CORBA_Sequence<T> {
  301. public:
  302.   inline _CORBA_Bounded_Sequence() : _CORBA_Sequence<T>(max) {}
  303.   inline _CORBA_Bounded_Sequence(_CORBA_ULong length,
  304.                  T           *value,
  305.                  _CORBA_Boolean release = 0)
  306.             : _CORBA_Sequence<T>(max,length,value,release) {}
  307.   inline _CORBA_Bounded_Sequence(const _CORBA_Bounded_Sequence<T,max>& s)
  308.             : _CORBA_Sequence<T>(s) {}
  309.   inline ~_CORBA_Bounded_Sequence() {}
  310.   inline _CORBA_Bounded_Sequence<T,max> &operator= (const _CORBA_Bounded_Sequence<T,max> &s);
  311.   inline _CORBA_ULong length() const { return _CORBA_Sequence<T>::length(); }
  312.   inline void length(_CORBA_ULong len);
  313.   inline size_t NP_alignedSize(size_t initialoffset) const;
  314.   inline void operator>>= (NetBufferedStream &s) const;
  315.   inline void operator<<= (NetBufferedStream &s);
  316.   inline void operator>>= (MemBufferedStream &s) const;
  317.   inline void operator<<= (MemBufferedStream &s);
  318. };
  319.  
  320.  
  321. template <class T,int max,int elmSize, int elmAlignment>
  322. class _CORBA_Bounded_Sequence_w_FixSizeElement 
  323.   : public _CORBA_Sequence<T> 
  324. {
  325. public:
  326.   inline _CORBA_Bounded_Sequence_w_FixSizeElement() {}
  327.   inline _CORBA_Bounded_Sequence_w_FixSizeElement(_CORBA_ULong length,
  328.                        T           *value,
  329.                        _CORBA_Boolean release = 0)
  330.     : _CORBA_Sequence<T>(max,length,value,release) {}
  331.   inline _CORBA_Bounded_Sequence_w_FixSizeElement(const 
  332.       _CORBA_Bounded_Sequence_w_FixSizeElement<T,max,elmSize,elmAlignment>& s) 
  333.     : _CORBA_Sequence<T>(s) {}
  334.   inline ~_CORBA_Bounded_Sequence_w_FixSizeElement() {}
  335.   inline _CORBA_Bounded_Sequence_w_FixSizeElement<T,max,elmSize,elmAlignment> &
  336.       operator= 
  337.         (const 
  338.           _CORBA_Bounded_Sequence_w_FixSizeElement<T,max,elmSize,elmAlignment>&
  339.             s);
  340.   inline _CORBA_ULong length() const;
  341.   inline void length(_CORBA_ULong len);
  342.   // omniORB2 extensions
  343.   inline size_t NP_alignedSize(size_t initialoffset) const;
  344.   inline void operator>>= (NetBufferedStream &s) const;
  345.   inline void operator<<= (NetBufferedStream &s);
  346.   inline void operator>>= (MemBufferedStream &s) const;
  347.   inline void operator<<= (MemBufferedStream &s);
  348. };
  349.  
  350. template <int max>
  351. class _CORBA_Bounded_Sequence__Boolean
  352.    : public _CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Boolean,max,1,1>
  353. {
  354. public:
  355.   inline _CORBA_Bounded_Sequence__Boolean() {}
  356.   inline _CORBA_Bounded_Sequence__Boolean(_CORBA_ULong length,
  357.                        _CORBA_Boolean    *value,
  358.                        _CORBA_Boolean release = 0)
  359.     : _CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Boolean,max,1,1>(length,value,release) {}
  360.   inline _CORBA_Bounded_Sequence__Boolean(const 
  361.                    _CORBA_Bounded_Sequence__Boolean<max>& s) 
  362.     :  _CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Boolean,max,1,1>(s) {}
  363.  
  364.   inline ~_CORBA_Bounded_Sequence__Boolean() {}
  365. };
  366.  
  367. template <int max>
  368. class _CORBA_Bounded_Sequence__Octet
  369.    : public _CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Octet,max,1,1>
  370. {
  371. public:
  372.   inline _CORBA_Bounded_Sequence__Octet() {}
  373.   inline _CORBA_Bounded_Sequence__Octet(_CORBA_ULong length,
  374.                        _CORBA_Octet    *value,
  375.                        _CORBA_Boolean release = 0)
  376.     : _CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Octet,max,1,1>(length,value,release) {}
  377.   inline _CORBA_Bounded_Sequence__Octet(const 
  378.                         _CORBA_Bounded_Sequence__Octet<max>& s) 
  379.     :  _CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Octet,max,1,1>(s) {}
  380.  
  381.   inline ~_CORBA_Bounded_Sequence__Octet() {}
  382. };
  383. ////////////////////////////////////////////////////////////////////////////
  384.  
  385. template <class T,class T_slice,class Telm,int dimension>
  386. class _CORBA_Sequence_Array {
  387. public:
  388.   inline _CORBA_Sequence_Array() : pd_max(0), pd_len(0), 
  389.                                    pd_rel(1), pd_buf(0) { }
  390.   inline _CORBA_Sequence_Array(_CORBA_ULong max) :
  391.              pd_max(max), pd_len(0), pd_rel(1)
  392.   {
  393.     if (!(pd_buf = allocbuf(max))) {
  394.       _CORBA_new_operator_return_null();
  395.       // never reach here
  396.     }
  397.     return;
  398.   }
  399.  
  400.   inline _CORBA_Sequence_Array(_CORBA_ULong max,
  401.                    _CORBA_ULong length,
  402.                    T           *value,
  403.                    _CORBA_Boolean release = 0) 
  404.       : pd_max(max), 
  405.     pd_len(length), 
  406.     pd_rel(release),
  407.     pd_buf(value)
  408.   {
  409.     if (length > max) {
  410.       _CORBA_bound_check_error();
  411.       // never reach here
  412.     }
  413.     return;
  414.   }
  415.  
  416.   inline _CORBA_Sequence_Array(const _CORBA_Sequence_Array<T,T_slice,Telm,dimension>& s)
  417.               : pd_max(s.pd_max), 
  418.         pd_len(s.pd_len),
  419.         pd_rel(1)
  420.   {
  421.     if (!(pd_buf = allocbuf(s.pd_len))) {
  422.       _CORBA_new_operator_return_null();
  423.       // never reach here
  424.     }
  425.     for (_CORBA_ULong i=0; i < s.pd_len; i++) {
  426.       for (_CORBA_ULong j=0; j < dimension; j++) {
  427.     *((Telm*)(pd_buf[i]) + j) = *((Telm*)(s.pd_buf[i]) + j);
  428.       }
  429.     }
  430.   }
  431.  
  432.   inline ~_CORBA_Sequence_Array() {
  433.     if (pd_rel && pd_buf) freebuf(pd_buf);
  434.     pd_buf = 0;
  435.     return;
  436.   }
  437.   inline _CORBA_Sequence_Array<T,T_slice,Telm,dimension> &operator= (const _CORBA_Sequence_Array<T,T_slice,Telm,dimension> &s)
  438.   {
  439.     if (pd_max < s.pd_max)
  440.       {
  441.     T *newbuf = allocbuf(s.pd_max);
  442.     if (!newbuf) {
  443.       _CORBA_new_operator_return_null();
  444.       // never reach here
  445.     }
  446.     pd_max = s.pd_max;
  447.     if (pd_rel && pd_buf) {
  448.       freebuf(pd_buf);
  449.     }
  450.     else {
  451.       pd_rel = 1;
  452.     }
  453.     pd_buf = newbuf;
  454.       }
  455.     pd_len = s.pd_len;
  456.     for (unsigned long i=0; i < pd_len; i++) {
  457.       for (_CORBA_ULong j=0; j < dimension; j++) {
  458.     *((Telm*)(pd_buf[i]) + j) = *((Telm*)(s.pd_buf[i]) + j);
  459.       }
  460.     }
  461.     return *this;
  462.   }
  463.  
  464.   inline _CORBA_ULong maximum() const { return pd_max; }
  465.   inline _CORBA_ULong length() const { return pd_len; }
  466.   inline void length(_CORBA_ULong length)
  467.   {
  468.     if (length > pd_max)
  469.       {
  470.     T *newbuf = allocbuf(length);
  471.     if (!newbuf) {
  472.       _CORBA_new_operator_return_null();
  473.       // never reach here
  474.     }
  475.     for (unsigned long i=0; i < pd_len; i++) {
  476.       for (_CORBA_ULong j=0; j < dimension; j++) {
  477.         *((Telm*)(newbuf[i]) + j) = *((Telm*)(pd_buf[i]) + j);
  478.       }
  479.     }
  480.     pd_max = length;
  481.     if (pd_rel && pd_buf) {
  482.       freebuf(pd_buf);
  483.     }
  484.     else {
  485.       pd_rel = 1;
  486.     }
  487.     pd_buf = newbuf;
  488.       }
  489.     pd_len = length;
  490.     return;
  491.   }
  492.   inline T_slice* operator[] (_CORBA_ULong index)
  493.   {
  494.     if (index >= length()) {
  495.       _CORBA_bound_check_error();
  496.     }
  497.     return (T_slice*)(pd_buf[index]);
  498.   }
  499.   inline const T_slice* operator[] (_CORBA_ULong index) const
  500.   {
  501.     if (index >= length()) {
  502.       _CORBA_bound_check_error();
  503.     }
  504.     return (const T_slice*)(pd_buf[index]);
  505.   }
  506.   static inline T* allocbuf(_CORBA_ULong nelems)
  507.   {
  508.     return new T[nelems];
  509.   }
  510.   static inline void freebuf(T * b)
  511.   {
  512.     if (b) delete [] b; 
  513.     return;
  514.   }
  515.   // omniORB2 extensions
  516.   inline T *NP_data() const { return pd_buf; }
  517.   inline void NP_norelease() { pd_rel = 0; }
  518.   inline void operator>>= (NetBufferedStream &s) const;
  519.   inline void operator<<= (NetBufferedStream &s);
  520.   inline void operator>>= (MemBufferedStream &s) const;
  521.   inline void operator<<= (MemBufferedStream &s);
  522. private:
  523.   _CORBA_ULong    pd_max;
  524.   _CORBA_ULong    pd_len;
  525.   _CORBA_Boolean  pd_rel;
  526.   T              *pd_buf;
  527. };
  528.  
  529. template <class T,class T_slice,class Telm,int dimension>
  530. class _CORBA_Unbounded_Sequence_Array : public _CORBA_Sequence_Array<T,T_slice,Telm,dimension> {
  531. public:
  532.   inline _CORBA_Unbounded_Sequence_Array() {}
  533.   inline _CORBA_Unbounded_Sequence_Array(_CORBA_ULong max) : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(max) {}
  534.   inline _CORBA_Unbounded_Sequence_Array(_CORBA_ULong max,
  535.                      _CORBA_ULong length,
  536.                      T           *value,
  537.                      _CORBA_Boolean release = 0)
  538.      : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(max,length,value,release) {}
  539.   inline _CORBA_Unbounded_Sequence_Array(const _CORBA_Unbounded_Sequence_Array<T,T_slice,Telm,dimension>& s) 
  540.      : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(s) {}
  541.   inline ~_CORBA_Unbounded_Sequence_Array() {}
  542.   inline _CORBA_Unbounded_Sequence_Array<T,T_slice,Telm,dimension> &operator= (const _CORBA_Unbounded_Sequence_Array<T,T_slice,Telm,dimension> &s) {
  543.     _CORBA_Sequence_Array<T,T_slice,Telm,dimension>::operator= (s);
  544.     return *this;
  545.   }
  546.   inline T *NP_data() const {
  547.       return _CORBA_Sequence_Array<T,T_slice,Telm,dimension>::NP_data();
  548.   }
  549.   inline size_t NP_alignedSize(size_t initialoffset) const;
  550.   inline void operator>>= (NetBufferedStream &s) const;
  551.   inline void operator<<= (NetBufferedStream &s);
  552.   inline void operator>>= (MemBufferedStream &s) const;
  553.   inline void operator<<= (MemBufferedStream &s);
  554. };
  555.  
  556. template <class T,class T_slice, class Telm,int dimension,int elmSize,int elmAlignment>
  557. class _CORBA_Unbounded_Sequence_Array_w_FixSizeElement 
  558.    : public _CORBA_Sequence_Array<T,T_slice,Telm,dimension> 
  559. {
  560. public:
  561.   inline _CORBA_Unbounded_Sequence_Array_w_FixSizeElement() {}
  562.   inline _CORBA_Unbounded_Sequence_Array_w_FixSizeElement(_CORBA_ULong max)
  563.     : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(max) {}
  564.   inline _CORBA_Unbounded_Sequence_Array_w_FixSizeElement(_CORBA_ULong max,
  565.                               _CORBA_ULong length,
  566.                               T           *value,
  567.                               _CORBA_Boolean release = 0)
  568.     : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(max,length,value,release) {}
  569.   inline _CORBA_Unbounded_Sequence_Array_w_FixSizeElement (const 
  570.        _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,Telm,dimension,elmSize,elmAlignment>& s)
  571.     : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(s) {}
  572.   inline ~_CORBA_Unbounded_Sequence_Array_w_FixSizeElement() {}
  573.   inline _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,Telm,dimension,elmSize,elmAlignment> &
  574.       operator= 
  575.         (const 
  576.       _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,Telm,dimension,elmSize,elmAlignment> &
  577.      s) 
  578.   {
  579.     _CORBA_Sequence_Array<T,T_slice,Telm,dimension>::operator= (s);
  580.     return *this;
  581.   }
  582.   inline T *NP_data() const {
  583.       return _CORBA_Sequence_Array<T,T_slice,Telm,dimension>::NP_data();
  584.   }
  585.   inline size_t NP_alignedSize(size_t initialoffset) const;
  586.   inline void operator>>= (NetBufferedStream &s) const;
  587.   inline void operator<<= (NetBufferedStream &s);
  588.   inline void operator>>= (MemBufferedStream &s) const;
  589.   inline void operator<<= (MemBufferedStream &s);
  590. };
  591.  
  592. template<class T, class T_slice, int dimension>
  593. class _CORBA_Unbounded_Sequence_Array__Boolean
  594.    : public _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Boolean,dimension,1,1>
  595. {
  596. public:
  597.   inline _CORBA_Unbounded_Sequence_Array__Boolean() {}
  598.   inline _CORBA_Unbounded_Sequence_Array__Boolean(_CORBA_ULong max)
  599.     : _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Boolean,dimension,1,1>(max) {}
  600.   inline _CORBA_Unbounded_Sequence_Array__Boolean(_CORBA_ULong max,
  601.                              _CORBA_ULong length,
  602.                              T *value,
  603.                              _CORBA_Boolean release = 0)
  604.     :  _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Boolean,dimension,1,1>(max,length,value,release) {}
  605.   inline _CORBA_Unbounded_Sequence_Array__Boolean (const 
  606.        _CORBA_Unbounded_Sequence_Array__Boolean<T,T_slice,dimension>& s)
  607.     :   _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Boolean,dimension,1,1>(s) {}
  608.  
  609.   inline ~_CORBA_Unbounded_Sequence_Array__Boolean() {}
  610. };
  611.  
  612.  
  613. template<class T, class T_slice, int dimension>
  614. class _CORBA_Unbounded_Sequence_Array__Octet
  615.    : public _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Octet,dimension,1,1>
  616. {
  617. public:
  618.   inline _CORBA_Unbounded_Sequence_Array__Octet() {}
  619.   inline _CORBA_Unbounded_Sequence_Array__Octet(_CORBA_ULong max)
  620.     :   _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Octet,dimension,1,1>(max) {}
  621.   inline _CORBA_Unbounded_Sequence_Array__Octet(_CORBA_ULong max,
  622.                              _CORBA_ULong length,
  623.                              T *value,
  624.                              _CORBA_Boolean release = 0)
  625.     :   _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Octet,dimension,1,1>(max,length,value,release) {}
  626.   inline _CORBA_Unbounded_Sequence_Array__Octet (const 
  627.        _CORBA_Unbounded_Sequence_Array__Octet<T,T_slice,dimension>& s)
  628.     :   _CORBA_Unbounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Octet,dimension,1,1>(s) {}
  629.  
  630.   inline ~_CORBA_Unbounded_Sequence_Array__Octet() {}
  631. };
  632.  
  633. template <class T,class T_slice,class Telm,int dimension,int max>
  634. class _CORBA_Bounded_Sequence_Array : public _CORBA_Sequence_Array<T,T_slice,Telm,dimension> {
  635. public:
  636.   inline _CORBA_Bounded_Sequence_Array() : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(max) {}
  637.   inline _CORBA_Bounded_Sequence_Array(_CORBA_ULong length,
  638.                        T           *value,
  639.                        _CORBA_Boolean release = 0)
  640.             : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(max,length,value,release) {}
  641.   inline _CORBA_Bounded_Sequence_Array(const _CORBA_Bounded_Sequence_Array<T,T_slice,Telm,dimension,max>& s)
  642.             : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(s) {}
  643.   inline ~_CORBA_Bounded_Sequence_Array() {}
  644.   inline _CORBA_Bounded_Sequence_Array<T,T_slice,Telm,dimension,max> &operator= (const _CORBA_Bounded_Sequence_Array<T,T_slice,Telm,dimension,max> &s);
  645.   inline _CORBA_ULong length() const { return _CORBA_Sequence_Array<T,T_slice,Telm,dimension>::length(); }
  646.   inline T *NP_data() const {
  647.       return _CORBA_Sequence_Array<T,T_slice,Telm,dimension>::NP_data();
  648.   }
  649.   inline void length(_CORBA_ULong len);
  650.   inline size_t NP_alignedSize(size_t initialoffset) const;
  651.   inline void operator>>= (NetBufferedStream &s) const;
  652.   inline void operator<<= (NetBufferedStream &s);
  653.   inline void operator>>= (MemBufferedStream &s) const;
  654.   inline void operator<<= (MemBufferedStream &s);
  655. };
  656.  
  657. template <class T,class T_slice,class Telm,int dimension,int max,int elmSize, int elmAlignment>
  658. class _CORBA_Bounded_Sequence_Array_w_FixSizeElement 
  659.   : public _CORBA_Sequence_Array<T,T_slice,Telm,dimension> 
  660. {
  661. public:
  662.   inline _CORBA_Bounded_Sequence_Array_w_FixSizeElement() {}
  663.   inline _CORBA_Bounded_Sequence_Array_w_FixSizeElement(_CORBA_ULong length,
  664.                             T           *value,
  665.                             _CORBA_Boolean release = 0)
  666.     : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(max,length,value,release) {}
  667.   inline _CORBA_Bounded_Sequence_Array_w_FixSizeElement(const 
  668.       _CORBA_Bounded_Sequence_Array_w_FixSizeElement<T,T_slice,Telm,dimension,max,elmSize,elmAlignment>& s) 
  669.     : _CORBA_Sequence_Array<T,T_slice,Telm,dimension>(s) {}
  670.   inline ~_CORBA_Bounded_Sequence_Array_w_FixSizeElement() {}
  671.   inline _CORBA_Bounded_Sequence_Array_w_FixSizeElement<T,T_slice,Telm,dimension,max,elmSize,elmAlignment> &
  672.       operator= 
  673.         (const 
  674.           _CORBA_Bounded_Sequence_Array_w_FixSizeElement<T,T_slice,Telm,dimension,max,elmSize,elmAlignment>&
  675.             s);
  676.   inline T *NP_data() const {
  677.       return _CORBA_Sequence_Array<T,T_slice,Telm,dimension>::NP_data();
  678.   }
  679.   inline _CORBA_ULong length() const;
  680.   inline void length(_CORBA_ULong len);
  681.   // omniORB2 extensions
  682.   inline size_t NP_alignedSize(size_t initialoffset) const;
  683.   inline void operator>>= (NetBufferedStream &s) const;
  684.   inline void operator<<= (NetBufferedStream &s);
  685.   inline void operator>>= (MemBufferedStream &s) const;
  686.   inline void operator<<= (MemBufferedStream &s);
  687. };
  688.  
  689. template<class T, class T_slice, int dimension, int max>
  690. class _CORBA_Bounded_Sequence_Array__Boolean
  691.    : public _CORBA_Bounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Boolean,dimension,max,1,1>
  692. {
  693. public:
  694.   inline _CORBA_Bounded_Sequence_Array__Boolean() {}
  695.   inline _CORBA_Bounded_Sequence_Array__Boolean(_CORBA_ULong length,
  696.                                 T *value,
  697.                             _CORBA_Boolean release = 0)
  698.     :  _CORBA_Bounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Boolean,dimension,max,1,1>(length,value,release) {}
  699.   inline _CORBA_Bounded_Sequence_Array__Boolean(const 
  700.       _CORBA_Bounded_Sequence_Array__Boolean<T,T_slice,dimension,max>& s) 
  701.     :  _CORBA_Bounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Boolean,dimension,max,1,1>(s) {}
  702.  
  703.   inline ~_CORBA_Bounded_Sequence_Array__Boolean() {}
  704. };
  705.  
  706. template<class T, class T_slice, int dimension, int max>
  707. class _CORBA_Bounded_Sequence_Array__Octet
  708.    : public _CORBA_Bounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Octet,dimension,max,1,1>
  709. {
  710. public:
  711.   inline _CORBA_Bounded_Sequence_Array__Octet() {}
  712.   inline _CORBA_Bounded_Sequence_Array__Octet(_CORBA_ULong length,
  713.                                 T *value,
  714.                             _CORBA_Boolean release = 0)
  715.     :  _CORBA_Bounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Octet,dimension,max,1,1>(length,value,release) {}
  716.   inline _CORBA_Bounded_Sequence_Array__Octet(const 
  717.       _CORBA_Bounded_Sequence_Array__Octet<T,T_slice,dimension,max>& s) 
  718.     :  _CORBA_Bounded_Sequence_Array_w_FixSizeElement<T,T_slice,_CORBA_Octet,dimension,max,1,1>(s) {}
  719.  
  720.   inline ~_CORBA_Bounded_Sequence_Array__Octet() {}
  721. };
  722.  
  723.  
  724. typedef _CORBA_Unbounded_Sequence__Octet _CORBA_Unbounded_Sequence_Octet;
  725.  
  726. #endif // __SEQTEMPLATES_H__
  727.  
  728.  
  729.  
  730.  
  731.  
  732.